'''
Created on 2014. 3. 29.

@author: agilinger
'''

class GeneElement(object):
    def __init__(self):
        '''
        Constructor
        '''
        

class Gene(object):
    '''
    classdocs
    '''
    def __init__(self):
        '''
        Constructor
        '''
        self.geneList = []        
        
    def addGeneElement(self, geneElement):
        '''
        Gene에 GeneElement 추가        
        '''  
        
        self.geneList.append(geneElement)

class Organism(object):
    '''
    classdocs
    '''
    
    def __init__(self):
        '''
        Constructor
        '''    
        self.myGene = Gene()
        self.weight = 0         
         
    def evaluate(self):
        '''
        현재 생명체의 점수 산정
        '''
        return(self.weight)
    
    def changeWeight(self, weight):
        '''
        현재 생명체의 weight 변경
        '''
        self.weight = weight
    
    def hibernate(self):
        '''
        현재 생명체의 정보를 DB로 저장할 수 있는 형태로 출력
        '''
        return self.weight